<?php



class DyAuth {


  
 /**用户登录，写入cookie**/ 
  
 /**用户登出，清除cookie**/
    
    public static function getip() {
        if($_SERVER['HTTP_CLIENT_IP']) {
            $onlineip=$_SERVER['HTTP_CLIENT_IP'];
        }elseif($_SERVER['HTTP_X_FORWARDED_FOR']) {
            $onlineip=$_SERVER['HTTP_X_FORWARDED_FOR'];
        }else {
            $onlineip=$_SERVER['REMOTE_ADDR'];
        }
        return $onlineip;
    }
   



}

?>
